package imageClassifying;

public class EuclideanDistancer implements IDistance {

	@Override
	public double calculateDistance(double[] dest, double[] source) {
		double result = 0;
		double tmp;
		for(int i = 0; i < dest.length; i++) {
			tmp = (dest[i]-source[i]);
			tmp*=tmp;
			result += tmp; 
		}
		result = Math.sqrt(result);
		return result;
	}

}
